// web/app/(commonLayout)/admin/page.tsx 管理员面板，用以控制大模型的配置                                                 
"use client";

import { Card } from "@/app/components/ui/card";
import { Bot, Users, Database, Activity } from "lucide-react";

export default function AdminDashboard() {
  return (
    <div className="p-8">
      <h1 className="text-2xl font-bold text-gray-800 mb-6">仪表盘</h1>
      
      <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
        {/* 大模型统计 */}
        <Card className="p-6">
          <div className="flex items-center">
            <div className="p-3 bg-blue-50 rounded-lg">
              <Bot className="w-6 h-6 text-blue-600" />
            </div>
            <div className="ml-4">
              <p className="text-sm text-gray-500">已配置大模型</p>
              <p className="text-2xl font-semibold text-gray-800">12</p>
            </div>
          </div>
        </Card>

        {/* 用户统计 */}
        <Card className="p-6">
          <div className="flex items-center">
            <div className="p-3 bg-green-50 rounded-lg">
              <Users className="w-6 h-6 text-green-600" />
            </div>
            <div className="ml-4">
              <p className="text-sm text-gray-500">注册用户</p>
              <p className="text-2xl font-semibold text-gray-800">256</p>
            </div>
          </div>
        </Card>

        {/* 知识库统计 */}
        <Card className="p-6">
          <div className="flex items-center">
            <div className="p-3 bg-purple-50 rounded-lg">
              <Database className="w-6 h-6 text-purple-600" />
            </div>
            <div className="ml-4">
              <p className="text-sm text-gray-500">知识库数量</p>
              <p className="text-2xl font-semibold text-gray-800">8</p>
            </div>
          </div>
        </Card>

        {/* 系统日志统计 */}
        <Card className="p-6">
          <div className="flex items-center">
            <div className="p-3 bg-orange-50 rounded-lg">
              <Activity className="w-6 h-6 text-orange-600" />
            </div>
            <div className="ml-4">
              <p className="text-sm text-gray-500">今日日志</p>
              <p className="text-2xl font-semibold text-gray-800">1,024</p>
            </div>
          </div>
        </Card>
      </div>

      {/* 系统状态 */}
      <div className="mt-8">
        <h2 className="text-lg font-semibold text-gray-800 mb-4">系统状态</h2>
        <Card className="p-6">
          <div className="space-y-4">
            <div className="flex justify-between items-center">
              <span className="text-gray-600">CPU 使用率</span>
              <span className="text-sm font-medium text-gray-800">45%</span>
            </div>
            <div className="flex justify-between items-center">
              <span className="text-gray-600">内存使用率</span>
              <span className="text-sm font-medium text-gray-800">62%</span>
            </div>
            <div className="flex justify-between items-center">
              <span className="text-gray-600">磁盘使用率</span>
              <span className="text-sm font-medium text-gray-800">38%</span>
            </div>
            <div className="flex justify-between items-center">
              <span className="text-gray-600">网络流量</span>
              <span className="text-sm font-medium text-gray-800">1.2 GB/s</span>
            </div>
          </div>
        </Card>
      </div>
    </div>
  );
}

